<template>
<!-- <ECharts :options="options" /> -->
    <div ref="div" style="height:500px;" id="report" ></div>
</template>
<script>
var ECharts = require('echarts');
// import * as ECharts from 'vue-echarts';
// import 'echarts-gl'
import { getReport } from '@/api/reports'
export default {
    name:"Reports",
    components:{
        // ECharts,
    },
    data() {
        return {
            /**
             * 配置项
             */
            options:{},
        };
    },
    methods: {
        /**
         * 获取报告信息
         */
        async getReportInfo(){
            try {
                this.options = await getReport();
                const echart = ECharts.init(this.$refs.div);
                echart.setOption(this.options);
            } catch (error) {
                console.log(1)
            };
        }
    },
    mounted() {
        this.getReportInfo();
    },
}
</script>
<style lang="less" scoped>
    
</style> 